package com.suppor.rpc.proto.serialization;

public class SerializationFactory {

    public static RpcSerializer get(byte type) {
        SerializationTypeEnum value = SerializationTypeEnum.findType(type);
        switch (value) {
            case JSON:
                return new JsonSerialization();
            case HESSIAN:
                return new HessianSerialization();
            default:
                throw new IllegalArgumentException("Not Support Type" + type);
        }
    }
}
